Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 870 for simplify (0.14 sec)

  1. src/regexp/syntax/simplify.go

    // The returned regexp may share structure with or be the original.
    func (re *Regexp) Simplify() *Regexp {
    	if re == nil {
    		return nil
    	}
    	switch re.Op {
    	case OpCapture, OpConcat, OpAlternate:
    		// Simplify children, building new Regexp if children change.
    		nre := re
    		for i, sub := range re.Sub {
    			nsub := sub.Simplify()
    			if nre == re && nsub != sub {
    				// Start a copy.
    				nre = new(Regexp)
    				*nre = *re
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 02 00:13:47 UTC 2016
    - 4.2K bytes
    - Viewed (0)
  2. src/cmd/gofmt/simplify.go

    						s.simplifyLiteral(ktyp, keyType, t.Key, &t.Key)
    					}
    					x = t.Value
    					px = &t.Value
    				}
    				s.simplifyLiteral(typ, eltType, x, px)
    			}
    			// node was simplified - stop walk (there are no subnodes to simplify)
    			return nil
    		}
    
    	case *ast.SliceExpr:
    		// a slice expression of the form: s[a:len(s)]
    		// can be simplified to: s[a:]
    		// if s is "simple enough" (for now we only accept identifiers)
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:06:14 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  3. test/fixedbugs/issue29329.go

    }
    
    type simplifier interface {
    	simplify(LineString, bool) (LineString, []int)
    }
    
    func lineString(s simplifier, ls LineString) LineString {
    	return runSimplify(s, ls)
    }
    
    func runSimplify(s simplifier, ls LineString) LineString {
    	if len(ls) <= 2 {
    		return ls
    	}
    	ls, _ = s.simplify(ls, false)
    	return ls
    }
    
    func (s *DouglasPeuckerSimplifier) simplify(ls LineString, wim bool) (LineString, []int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  4. src/regexp/syntax/simplify_test.go

    		re, err := Parse(tt.Regexp, MatchNL|Perl&^OneLine)
    		if err != nil {
    			t.Errorf("Parse(%#q) = error %v", tt.Regexp, err)
    			continue
    		}
    		s := re.Simplify().String()
    		if s != tt.Simple {
    			t.Errorf("Simplify(%#q) = %#q, want %#q", tt.Regexp, s, tt.Simple)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:02:30 UTC 2023
    - 4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/ir/.clang-tidy

            readability-inconsistent-declaration-parameter-name,
            readability-misleading-indentation,
            readability-redundant-control-flow,
            readability-simplify-boolean-expr,
            readability-simplify-subscript-expr,
            readability-use-anyofallof
            # LINT.ThenChange(METADATA:checks)
    
    CheckOptions:
      # LINT.IfChange(check-options)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 29 18:55:28 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  6. pkg/util/hash/hash.go

    	}
    }
    
    // Write wraps the Hash.Write function call
    // Hash.Write error always return nil, this func simplify caller handle error
    func (i *instance) Write(p []byte) (n int) {
    	n, _ = i.hash.Write(p)
    	return
    }
    
    // Write wraps the Hash.Write function call
    // Hash.Write error always return nil, this func simplify caller handle error
    func (i *instance) WriteString(s string) (n int) {
    	n, _ = i.hash.WriteString(s)
    	return
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 20:24:14 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. releasenotes/notes/51074.yaml

    apiVersion: release-notes/v2
    kind: bug-fix
    area: installation
    issue:
      - 50958
    releaseNotes:
    - |
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 21 18:32:01 UTC 2024
    - 185 bytes
    - Viewed (0)
  8. docs_src/path_operation_advanced_configuration/tutorial002.py

    from fastapi.routing import APIRoute
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
            if isinstance(route, APIRoute):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 572 bytes
    - Viewed (0)
  9. .golangci.yml

    linters-settings:
      gofumpt:
        simplify: true
    
      misspell:
        locale: US
    
      staticcheck:
        checks: ['all', '-ST1005', '-ST1000', '-SA4000', '-SA9004', '-SA1019', '-SA1008', '-U1000', '-ST1016']
    
    linters:
      disable-all: true
      enable:
        - durationcheck
        - gocritic
        - gofumpt
        - goimports
        - gomodguard
        - govet
        - ineffassign
        - misspell
        - revive
        - staticcheck
        - tenv
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Dec 07 02:17:03 UTC 2023
    - 689 bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/factories/NormalizingExcludeFactory.java

        }
    
        @Override
        public ExcludeSpec anyOf(ExcludeSpec one, ExcludeSpec two) {
            return simplify(ExcludeAllOf.class, one, two, (left, right) -> doUnion(ImmutableSet.of(left, right)));
        }
    
        @Override
        public ExcludeSpec allOf(ExcludeSpec one, ExcludeSpec two) {
            return simplify(ExcludeAnyOf.class, one, two, (left, right) -> doIntersect(ImmutableSet.of(left, right)));
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 17.4K bytes
    - Viewed (0)
Back to top